package com.mysoft.gfyx.container;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

/**
 * 容器启动类
 *
 * @Des mysoft.scanBasePackage 为从配置中取,在启动启动前动态生成该配置
 */
@SuppressWarnings("ALL")
@Slf4j
@EnableAutoConfiguration
@SpringBootApplication(scanBasePackages = "${mysoft.scanBasePackages}", exclude = DataSourceAutoConfiguration.class)
@MapperScan(basePackages = "${mysoft.scanBasePackages}", markerInterface = BaseMapper.class)
public class GfyxApplication {
    public static void main(String[] args) {
        try {
            SpringApplication.run(GfyxApplication.class, args);
        } catch (Exception e) {
            log.error("服务启动失败", e);
        }
    }
}